package com.coincalf.wallet.blockchain.bean.xrp;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author czj
 * @date 2019/9/11 2:36 PM
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class XrpTx {

    //转账地址
    @JsonProperty(value = "Account")
    private String account;

    //转账金额 单位:dxrp
    @JsonProperty(value = "Amount")
    private BigDecimal amount;

    //收款地址
    @JsonProperty(value = "Destination")
    private String destination;

    @JsonProperty(value = "DestinationTag")
    private String destinationTag;

    //手续费 单位:dxrp
    @JsonProperty(value = "Fee")
    private BigDecimal fee;

    @JsonProperty(value = "Flags")
    private long flags;

    @JsonProperty(value = "Sequence")
    private long sequence;

    @JsonProperty(value = "SigningPubKey")
    private String signingPubKey;

    @JsonProperty(value = "TransactionType")
    private String transactionType;

    @JsonProperty(value = "TxnSignature")
    private String txnSignature;

    @JsonProperty(value = "date")
    private long date;

    @JsonProperty(value = "hash")
    private String hash;

    @JsonProperty(value = "inLedger")
    private long inLedger;

    //区块高度
    @JsonProperty(value = "ledger_index")
    private long ledgerIndex;

    @JsonProperty(value = "meta")
    private Object meta;

    @JsonProperty(value = "status")
    private String status;

    //交易是否验证 为验证的交易区块高度为0
    @JsonProperty(value = "validated")
    private boolean validated;

}
